@extends('admin.layouts.master')
@section('content')
    <table class="mdui-table mdui-table-hoverable">
        <thead>
        <tr>
            <th>ID</th>
            <th>轮播图图片</th>
            <th>轮播图图片说明</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($carousels as $carousel)
            <tr>
                <td>{{$carousel->id}}</td>
                <td><img style="width: 80px;height: 80px;" src="{{asset('/uploads/'.$carousel->imgpath)}}"></td>
                {{--原文本输出--}}
                <td>{!!$carousel->comment!!}</td>
                <td>
                    <a href="{{url('/admin/admin_carousel/edit',['id'=>$carousel->id])}}"
                       class="mdui-btn mdui-btn-dense mdui-color-blue mdui-ripple">修改</a>
                    {{--删除--}}
                    <a href="{{url('/admin/admin_carousel/destroy',['id'=>$carousel->id])}}"
                       class="mdui-btn mdui-btn-dense mdui-color-blue mdui-ripple"
                       onclick="if(confirm('确定删除吗?')==false) return false;">删除</a>
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
@endsection
